import { HTTP_STATUS } from '#src/constants/http.constants.js';
import { CommonMessage } from '#src/constants/message.constants.js';
import AppError from './AppError.js';

/**
 * 资源冲突错误（409）
 * 用于处理资源已存在等冲突场景
 */
export default class ConflictError extends AppError {
  constructor(message = CommonMessage.CONFLICT, statusCode = HTTP_STATUS.CONFLICT) {
    super(message, statusCode);
    this.name = 'ConflictError';
  }
}